package com.ny.service.impl;

import com.ny.dao.StudentDao;
import com.ny.dao.impl.StudentDaoImpl;
import com.ny.entity.Student;
import com.ny.service.StudentService;

import java.sql.SQLException;

public class StudentServiceImpl implements StudentService{
    private StudentDao studentDao=new StudentDaoImpl();
    public Student selectStudent(String sname,String spassword)throws SQLException{
        return studentDao.selectStudent(sname,spassword);
    }
    public  int insertStudent(Student student) throws SQLException{
        return  studentDao.insertStudent(student);
    }

    @Override
    public int updateStudent(Student student) throws SQLException {
        return studentDao.updateStudent(student);
    }
}